package com.parenting.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.parenting.sevice.GoldService;
import com.parenting.request.GoldRequest;
import com.parenting.response.GoldAdminResponse;
import com.parenting.util.base.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 我的金币记录 前端控制器
 * </p>
 *
 * @author wsx
 * @since 2021年10月21日
 */
@RestController
@RequestMapping("/gold")
@Api(tags = "积分分享")
public class GoldController {

    @Autowired
    private GoldService goldService;

    @ApiOperation(value = "获得金币列表(后端)", httpMethod = "POST")
    @PostMapping("/pageList")
    public Result<Page<GoldAdminResponse>> pageList(@RequestBody @Validated GoldRequest request) {
        return goldService.pageList(request);
    }
}
